
import Config from "./config"

let tools:any = {
    get_url(path:any){
        return Config.baseUrl + path
    },
    getTime (time:any) {
        var date =  new Date(time);
        var y = 1900+(date as any).getYear();
        var m = "0"+(date.getMonth()+1);
        var d = "0"+date.getDate();
    
        var hh = date.getHours();
        var mm = date.getMinutes();
        var ss = date.getSeconds();
    
        if(y < 2000) return ''
    
        return y+"-"+m.substring(m.length-2,m.length)+"-"+d.substring(d.length-2,d.length) + " " + hh + ":" + mm + ":" + ss;
      }
}

export default tools